package window;

import window.service.mouseService;
import window.tab.*;
import window.panel.TopPanel;

import javax.swing.*;
import java.awt.*;

public class MainWindow extends JFrame {
    public MainWindow() {
        setTitle("PARA Ticket System");
        setSize(1200, 700);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLayout(new BorderLayout());

        JTabbedPane tabbedPane = new JTabbedPane();
        tabbedPane.addTab("HOME 🏠", new HomeTab());
        tabbedPane.addTab("HOTEL 🏨", new HotelTab());
        tabbedPane.addTab("FLIGHTS ✈️", new FlightTab());
        tabbedPane.addTab("MY 🚶️", new MyTab());

        mouseService mouse = new mouseService();
        mouse.TabChangeHand(tabbedPane);


        tabbedPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20));

        TopPanel topPanel = new TopPanel();
        topPanel.setBorder(BorderFactory.createEmptyBorder(10, 20, 0, 20));
        this.add(topPanel, BorderLayout.NORTH);
        this.add(tabbedPane, BorderLayout.CENTER);
    }

    public static void main(String[] args) {
        MainWindow mainWindow = new MainWindow();
        mainWindow.setVisible(true);
    }
}
